home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 26
/
Cream of the Crop 26.iso
/
program
/
ddj0897.zip
/
CCDBMS.ZIP
/
MAIN.CPP
< prev
next >
Wrap
C/C++ Source or Header
|
1997-03-18
|
1KB
|
40 lines
// =================================================================
// Dbcmd.cpp
// =================================================================
// Harold Kasperink / John Dekker
// Dr. Dobb's Journal 1997
// =================================================================
// Main program
//
// This program gives you an idea of how you can put the classes
// together to a real program. We have set up the example in a way
// that it will compile but it doesn't provide real functionallity
// We've worked around the Thread and the Oracle Databse stuff because
// we want to illustrate how our program skeleton works and because
// you maybe haven't the appropriate libraries at your system.
// However the program should contain enough information to
// rewrite it for your use in your own programming environment
//
// The project makefile is test made with Microsoft Visual C++ 4.2
// =================================================================
#include <stdio.h>
#include "database.h"
int main()
{
// Set number of database connections to use
int NrDbase = 1;
char *pszFirstName = "User";
char *pszLastName = "Test";
CArrayDbase lDbArray(NrDbase, "User", "Password", "Connectionstring");
CDbase *pDb = CArrayDbase::ReserveDbase();
CDbFindPerson lFindPerson(pszFirstName, pszLastName );
lFindPerson.Do();
CArrayDbase::ReleaseDbase(*pDb);
return 0;
}